From 9a65bc7c6c494c979be4117e2116df11cb8ce85c Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 25 May 2007 09:38:09 -0600 Subject: [PATCH] [IA64] Cleanup warnings for UC accesses to UC|WB pages This patch cleanup the following warning. (XEN) mm.c:497:d0 Warning: UC to WB for mpaddr=xxxxxxxx Signed-off-by: Akio Takebe Signed-off-by: Alex Williamson --- xen/arch/ia64/xen/mm.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 45f15f9c46..fae5f9276a 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -498,9 +498,22 @@ u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* logps, This can happen when domU tries to touch i/o port space. Also prevents possible address aliasing issues. */ - if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE)) - gdprintk(XENLOG_WARNING, "Warning: UC to WB " - "for mpaddr=%lx\n", mpaddr); + if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE)) { + u64 ucwb; + + /* + * If dom0 page has both UC & WB attributes + * don't warn about attempted UC access. + */ + ucwb = efi_mem_attribute(mpaddr, PAGE_SIZE); + ucwb &= EFI_MEMORY_UC | EFI_MEMORY_WB; + ucwb ^= EFI_MEMORY_UC | EFI_MEMORY_WB; + + if (d != dom0 || ucwb != 0) + gdprintk(XENLOG_WARNING, "Warning: UC" + " to WB for mpaddr=%lx\n", + mpaddr); + } pteval = (pteval & ~_PAGE_MA_MASK) | _PAGE_MA_WB; } break; -- 2.30.2